<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'test.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>
  
  <body>
    <iframe id="myiframe" width="565px" height="305px" style="background-color: #ffffff;" frameborder="0" marginwidth="0" marginheight="0" 
    src="<%= request.getContextPath() %>/admin/champion/test1.jsp"></iframe>
    <script type="text/javascript">
    	var iframe = document.getElementById('myiframe');
		var prmstr = window.location.search.substr(1);
		var prmarr = prmstr.split ("&");
		for ( var i = 0; i < prmarr.length; i++) {
		    var tmparr = prmarr[i].split("=");
		    if(tmparr[0] == 'affid') {
		    	if(iframe.src.indexOf("?") != -1){
		    		iframe.src = iframe.src +"&"+ tmparr[0]+ "=" + tmparr[1];
		    	} else {
		    		iframe.src = iframe.src +"?"+ tmparr[0]+ "=" + tmparr[1];
		    	}
		    }
		}
		//alert(iframe.src);
	</script>
  </body>
</html>
